export default {
    state:{
        isCollapse:false,
        tabsList:[
            {
                path:'/',
                name:'home',
                label:'首页',
                icon:'s-home',
                url:'Home/Home'
            },
        ]
    },
    mutations:{
        // 菜单展开收起的方法
        collapseMenu(state){
            state.isCollapse = !state.isCollapse
        },
        // 面包屑
        selectMenu(state,val){
            if(val.name !== 'home'){
                const index = state.tabsList.findIndex(item=> item.name === val.name)
                if( index === -1 ){
                    state.tabsList.push(val)
                }
            }
        },
    }
}